package cn.koala.key.firstmaintain.service.impl;

import cn.koala.key.api.FirstMaintainCardBorrowOrderApi;
import cn.koala.key.common.feign.FeignUtils;
import cn.koala.key.firstmaintain.entity.dto.FirstMaintainCardBorrowOrderCancelDTO;
import cn.koala.key.firstmaintain.entity.dto.FirstMaintainCardBorrowOrderOutDTO;
import cn.koala.key.firstmaintain.entity.dto.FirstMaintainCardBorrowOrderRefuseDTO;
import cn.koala.key.firstmaintain.entity.dto.FirstMaintainCardBorrowOrderSearchParamVO;
import cn.koala.key.firstmaintain.entity.vo.*;
import cn.koala.key.firstmaintain.service.FirstMaintainCardBorrowOrderService;
import cn.seed.common.core.Result;
import cn.seed.common.core.ResultList;
import org.springframework.stereotype.Service;

/**
 * 首保卡借用单
 *
 * @author liutao
 * @date 2021/1/29
 */
@Service
public class FirstMaintainCardBorrowOrderServiceImpl implements FirstMaintainCardBorrowOrderService {


    @Override
    public Result<?> borrowOut(FirstMaintainCardBorrowOrderOutDTO borrowOrderOutDTO) {
        return FeignUtils.getHttpApi(FirstMaintainCardBorrowOrderApi.class).borrowOut(borrowOrderOutDTO);
    }


    @Override
    public Result<?>  confirmReceiveCard(String orderNo, String oprNo, String oprName) {
        return FeignUtils.getHttpApi(FirstMaintainCardBorrowOrderApi.class).confirmReceiveCard(orderNo, oprNo, oprName);
    }

    @Override
    public Result<?> refuseOrder(FirstMaintainCardBorrowOrderRefuseDTO refuseDTO) {
        return FeignUtils.getHttpApi(FirstMaintainCardBorrowOrderApi.class).refuse(refuseDTO);
    }

    @Override
    public Result<?> cancelOrder(FirstMaintainCardBorrowOrderCancelDTO cancelDTO) {
        return FeignUtils.getHttpApi(FirstMaintainCardBorrowOrderApi.class).cancel(cancelDTO);
    }

    @Override
    public Result<ResultList<FirstMaintainCardBorrowOrderSearchResultVO>> searchByCondition(FirstMaintainCardBorrowOrderSearchParamVO paramVO) {
        return FeignUtils.getHttpApi(FirstMaintainCardBorrowOrderApi.class).searchByCondition(paramVO);
    }

    @Override
    public Result<FirstMaintainCardBorrowOrderDetailVO> orderDetail(String orderNo) {
        return FeignUtils.getHttpApi(FirstMaintainCardBorrowOrderApi.class).orderDetail(orderNo);
    }

    @Override
    public Result<FirstMaintainCardBorrowOrderFillOrderInfoVO> fillOrderInfo(String orderNo) {
        return FeignUtils.getHttpApi(FirstMaintainCardBorrowOrderApi.class).fillOrderInfo(orderNo);
    }

}
